package com.ostrich.a2104gao5.test15

/**
 * @Author : yaotianxue
 * @Time : On 2023/10/16 15:53
 * @Description : Test15
 */
fun main(){
   println( check(Type.MOVE))
}
fun check(type:Type):String{
    return when(type){
        Type.DOWN -> "下"
        Type.UP -> "上"
        Type.MOVE -> "移动"
        //不需要写else
    }
}
